import { useSelector } from "react-redux";
import { RootState } from "@/redux/store";
import { CSSProperties, PropsWithChildren } from "react";


type ContainerProps = PropsWithChildren<{
    style?: CSSProperties
    className?: string
}>

const Container = (props: ContainerProps) => {

    const { theme } = useSelector((state: RootState) => state.pub)

    const s: CSSProperties = {
        width: '100%',
        height: '100%',
        borderRadius: '8px',
        border: `var(--border-color-${theme}) 1px solid`,
        ...props.style
    }

    return <div style={s} className={props.className}>
        {props.children}
    </div>;
}

export default Container;